package org.mags.gps.testing;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.junit.Before;

public class RemoteAccess {
	private String server;
	private String appName;
	private String userName;
	private String password;
	private String port;
	
	public String getPort() {
		return port;
	}
	public void setPort(String port) {
		this.port = port;
	}
	public static String number2String(Number number) {
		return number.toString();
	}
	public static String date2String(Date date) {
		SimpleDateFormat formatter = new SimpleDateFormat();
		formatter.applyPattern("yyyyMMddHHmmss");
		return formatter.format(date);
	}
	public void loadRemoteProperties() {
		setServer("186.151.196.108");
		setAppName("smart-solutions-test");  //PRECAUCIÓN NO DIRECCIONAR A PRODUCCIÓN
		setUserName("maps");
		setPassword("january1821$%");
		setPort("8080");
	}
	public void loadLocalProperties() {
		setServer("localhost");
		setAppName("mercury-web");
		setUserName("maps");
		setPassword("january1821$%");
		setPort("8080");
	}
	@Before
	public void before() {
		loadLocalProperties();
		//loadRemoteProperties();
	}
	public String getServer() {
		return server;
	}
	public void setServer(String server) {
		this.server = server;
	}
	public String getAppName() {
		return appName;
	}
	public void setAppName(String appName) {
		this.appName = appName;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

}
